#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;

class Solution {
public:
    int searchInsert(vector<int>& nums, int target)
    {
        int size = nums.size();
        int left = 0;
        int right = size - 1;
        int ans = size;
        while (left <= right)
        {
            int mid = (right - left) / 2 + left;
            if (target <= nums[mid])
            {
                ans = mid;
                right = mid - 1;
            }
            else
            {
                left = mid + 1;
            }
        }
        return ans;
    }
};


int main()
{

	return 0;
}